const { contextBridge,ipcRenderer } = require("electron")
const fs = require("fs")
const os = require("os")
//node程序模块入驻
contextBridge.exposeInMainWorld( 
    'ipc',
    {
    send:(key,args)=>ipcRenderer.send(key,args),
    on:(key,args)=>ipcRenderer.on(key,args),
    once:(key,args)=>ipcRenderer.once(key,args),
    removeAllListeners:(key)=>ipcRenderer.removeAllListeners(key),
    invoke:(key,ages)=>ipcRenderer.invoke(key,ages)
    }
)
contextBridge.exposeInMainWorld(
    "sdk",{
        isDev:process.env.NODE_ENV=="development",
        os:{...os},
        fs:{
            ...fs
        }
    }
)
console.log("0000000000099999========",process.env.NODE_ENV);